package app.mvc.controller.app
{
	import app.mvc.Notifications;
	import app.mvc.controller.data.SaveFileCommand;
	import app.mvc.controller.editor.AddObjectCommand;
	import app.mvc.controller.editor.ChangeBackgroundCommand;
	import app.mvc.controller.editor.ClearObjectsCommand;
	import app.mvc.controller.editor.MoveObjectCommand;
	import app.mvc.controller.editor.RedoCommand;
	import app.mvc.controller.editor.RemoveObjectCommand;
	import app.mvc.controller.editor.UndoCommand;
	import app.mvc.view.mediators.ObjectsViewMediator;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * 注册各种editor的命令
	 * @author XiLing
	 */
	public class RegisterCommand extends SimpleCommand implements ICommand
	{
		public function RegisterCommand()
		{
			super();
		}
		
		override public function execute(notification:INotification):void
		{
			// TODO Auto Generated method stub
			super.execute(notification);
			
			//注册各类命令
			//系统
			facade.registerCommand(Notifications.CMD_TO_SAVE_FILE,SaveFileCommand);
			facade.registerCommand(Notifications.CMD_TO_UNDO,UndoCommand);
			facade.registerCommand(Notifications.CMD_TO_REDO,RedoCommand);
			//控件层
			facade.registerCommand(Notifications.CMD_TO_CLEAR_OBJECTS,ClearObjectsCommand);
			facade.registerCommand(Notifications.CMD_TO_ADD_OBJECT,AddObjectCommand);
			facade.registerCommand(Notifications.CMD_TO_REMOVE_OBJECT,RemoveObjectCommand);
			facade.registerCommand(Notifications.CMD_TO_MOVE_OBJECTS,MoveObjectCommand);
			
			facade.registerCommand(Notifications.CMD_TO_CHANGE_BACKGROUND,ChangeBackgroundCommand);		//更换背景
		}
		
	}
}